In [1]:
#Here we illustrate how to sample n-body particles with Galaxia.
"""
We will produce a simple n-body version of the LMC/SMC. We model it as a simple 3d Gaussian distribution.
Data that we put in:
SIMBAD:
smc_l = 302.8
smc_b = -44.3
lmc_l = 280.5
lmc_b = -32.9
GUMS paper:
smc_depth = 1.48 kpc
lmc_depth = 0.75 kpc
smc_diameter = 2.1kpc
lmc_diameter = 4.3 kpc
distance_lmc = 48.1 kpc
distance_smc = 60.6 kpc
mu_alpha_smc = 0.95 mas/yr
mu_delta_smc = -1.14 mas/yr
mu_alpha_lmc = 1.95 mas/yr
mu_delta_lmc = 0.43 mas/yr
vlos_smc = 158 km/s
vlos_lmc = 283 km/s
feh_smc = -1.2 +- 0.2 dex
feh_lmc = -0.75 +- 0.5
sfr_smc = constant
sfr_lmc = constant
mass_smc = (5.31 ± 0.05) × 10^8 Msun (stellar mass) https://ui.adsabs.harvard.edu/abs/2018MNRAS.478.5017R/abstract (total mass: 2.4 × 10^9 Msun)
mass_lmc = 5x10^9 Msun (same ratio as SMC total to stellar mass would be 5e9) total mass 1e11 Msun
# Scaling to GDR2 counts
mass_smc = (5.31 ± 0.05) × 10^8 Msun (stellar mass) https://ui.adsabs.harvard.edu/abs/2018MNRAS.478.5017R/abstract (total mass: 2.4 × 10^9 Msun)
mass_lmc = 2.5x10^9 Msun (we scale to GDR2 starcounts) (same ratio as SMC total to stellar mass would be 5e9) total mass 1e11 Msun

diameter_smc = 7000 lyr
diameter_lmc = 14000 lyr
velocity_dispersion_smc = 2 km/s guess

SMC = (x, y, z) in kpc
    (15.41505773, -36.45615675, -42.3529639)
 (v_x, v_y, v_z) in km / s
    (-30.27567249, -195.93860278, 132.71019931)>
LMC = (x, y, z) in kpc
    (-0.68927397, -39.70942142, -26.12549237)
 (v_x, v_y, v_z) in km / s
    (-79.46073554, -250.78236772, 205.32537167)>
"""


Out[1]:
'\nWe will produce a simple n-body version of the LMC/SMC. We model it as a simple 3d Gaussian distribution.\nData that we put in:\nSIMBAD:\nsmc_l = 302.8\nsmc_b = -44.3\nlmc_l = 280.5\nlmc_b = -32.9\nGUMS paper:\nsmc_depth = 1.48 kpc\nlmc_depth = 0.75 kpc\nsmc_diameter = 2.1kpc\nlmc_diameter = 4.3 kpc\ndistance_lmc = 48.1 kpc\ndistance_smc = 60.6 kpc\nmu_alpha_smc = 0.95 mas/yr\nmu_delta_smc = -1.14 mas/yr\nmu_alpha_lmc = 1.95 mas/yr\nmu_delta_lmc = 0.43 mas/yr\nvlos_smc = 158 km/s\nvlos_lmc = 283 km/s\nfeh_smc = -1.2 +- 0.2 dex\nfeh_lmc = -0.75 +- 0.5\nsfr_smc = constant\nsfr_lmc = constant\nmass_smc = (5.31 ± 0.05) × 10^8 Msun (stellar mass) https://ui.adsabs.harvard.edu/abs/2018MNRAS.478.5017R/abstract (total mass: 2.4 × 10^9 Msun)\nmass_lmc = 5x10^9 Msun (same ratio as SMC total to stellar mass would be 5e9) total mass 1e11 Msun\n# Scaling to GDR2 counts\nmass_smc = (5.31 ± 0.05) × 10^8 Msun (stellar mass) https://ui.adsabs.harvard.edu/abs/2018MNRAS.478.5017R/abstract (total mass: 2.4 × 10^9 Msun)\nmass_lmc = 2.5x10^9 Msun (we scale to GDR2 starcounts) (same ratio as SMC total to stellar mass would be 5e9) total mass 1e11 Msun\n\ndiameter_smc = 7000 lyr\ndiameter_lmc = 14000 lyr\nvelocity_dispersion_smc = 2 km/s guess\n\nSMC = (x, y, z) in kpc\n    (15.41505773, -36.45615675, -42.3529639)\n (v_x, v_y, v_z) in km / s\n    (-30.27567249, -195.93860278, 132.71019931)>\nLMC = (x, y, z) in kpc\n    (-0.68927397, -39.70942142, -26.12549237)\n (v_x, v_y, v_z) in km / s\n    (-79.46073554, -250.78236772, 205.32537167)>\n'

In [2]:
from astropy.coordinates import SkyCoord, ICRS, CartesianRepresentation, CartesianDifferential, Galactic, Galactocentric
import astropy.units as u

In [3]:
#SMC
c1 = SkyCoord(l = 302.8*u.degree, b = -44.3*u.degree, frame='galactic')
ra = c1.icrs.ra.value
dec = c1.icrs.dec.value
print("ra in deg:",ra)
print("dec in deg:",dec)
c = SkyCoord(ra=ra*u.degree, dec=dec*u.degree, distance=60.6*u.kpc, frame='icrs',
             pm_ra_cosdec = 0.95*u.mas/u.yr, pm_dec = -1.14*u.mas/u.yr, radial_velocity = 158*u.km/u.s,
             galcen_distance = 8.0*u.kpc, z_sun = 15.0*u.pc,
             galcen_v_sun=CartesianDifferential(d_x=11.1*u.km/u.s, d_y=239.08*u.km/u.s, d_z=7.25*u.km/u.s))
c.galactocentric


ra in deg: 13.17927729718147
dec in deg: -72.82792474314047
Out[3]:
<SkyCoord (Galactocentric: galcen_coord=<ICRS Coordinate: (ra, dec) in deg
    (266.4051, -28.936175)>, galcen_distance=8.0 kpc, galcen_v_sun=(11.1, 239.08, 7.25) km / s, z_sun=15.0 pc, roll=0.0 deg): (x, y, z) in kpc
    (15.41505773, -36.45615675, -42.3529639)
 (v_x, v_y, v_z) in km / s
    (-30.27567249, -195.93860278, 132.71019931)>

In [4]:
#LMC
c1 = SkyCoord(l = 280.5*u.degree, b = -32.9*u.degree, frame='galactic')
ra = c1.icrs.ra.value
dec = c1.icrs.dec.value
print("ra in deg:",ra)
print("dec in deg:",dec)
c = SkyCoord(ra=ra*u.degree, dec=dec*u.degree, distance=48.1*u.kpc, frame='icrs',
             pm_ra_cosdec = 1.95*u.mas/u.yr, pm_dec = 0.43*u.mas/u.yr, radial_velocity = 283*u.km/u.s,
             galcen_distance = 8.0*u.kpc, z_sun = 15.0*u.pc,
             galcen_v_sun=CartesianDifferential(d_x=11.1*u.km/u.s, d_y=239.08*u.km/u.s, d_z=7.25*u.km/u.s))
c.galactocentric


ra in deg: 80.8456130588062
dec in deg: -69.78267074987376
Out[4]:
<SkyCoord (Galactocentric: galcen_coord=<ICRS Coordinate: (ra, dec) in deg
    (266.4051, -28.936175)>, galcen_distance=8.0 kpc, galcen_v_sun=(11.1, 239.08, 7.25) km / s, z_sun=15.0 pc, roll=0.0 deg): (x, y, z) in kpc
    (-0.68927397, -39.70942142, -26.12549237)
 (v_x, v_y, v_z) in km / s
    (-79.46073554, -250.78236772, 205.32537167)>

In [5]:
%pylab inline
import ebf
import shutil
import subprocess
from astropy.io import fits
import os, sys
path = os.path.abspath('../library/')
if path not in sys.path:
    sys.path.append(path)
from convert_to_recarray import create_gdr2mock_mag_limited_survey_from_nbody


Populating the interactive namespace from numpy and matplotlib

In [6]:
# Need to specify where the GalaxiaData folder is and how to name the new simulation

nbody_folder = '/home/rybizki/Programme/GalaxiaData/'
folder = 'LSMC/'
nbody_filename = 'MCs'
folder_cat = '../output/MCs'

In [7]:
def create_n_body(nbody_folder,folder,filename):
    '''
    VERY IMPORTANT: NEEDS AN AGE-METALLICITY RELATION!
    '''
    # 2 input files for Galaxia need to be created
    folder_create = nbody_folder + 'nbody1/' + folder
    if os.path.exists(folder_create):
        shutil.rmtree(folder_create)
        os.mkdir(folder_create)
        print(folder_create, "existed and was recreated")
    else:
        os.mkdir(folder_create)

    # Age metallicity distribution is specified in this input file, using Model A from Just&Jahreiß 2010
    #fehdex = np.log10(zfe)
    # Here we can specify the AMR according to our needs
    stellar_masses = [6e8,3.8e9]
    particles_spawned = [10000,100000]
    feh_mean = [-1.2,-0.75]
    feh_disperson = [0.2,0.5]
    extends = [2.1,4.3]
    velocity_dispersion = [10,20]
    pos_x = [15.41505773,-0.68927397]
    pos_y = [-36.45615675,-39.70942142]
    pos_z = [-42.3529639,-26.12549237]
    vel_x = [-30.27567249,-79.46073554]
    vel_y = [-195.93860278,-250.78236772]
    vel_z = [132.71019931,205.32537167]
    names = ['smc','lmc']
    for j,name in enumerate(names):
        print(j,name)
        total_stellar_mass = stellar_masses[j]
        particles = particles_spawned[j]
        age = np.linspace(0,13.5,num = particles+1)[1:]
        fehdex = np.sort(np.random.normal(feh_mean[j],feh_disperson[j],particles))
        #ohdex = np.log10(zox)
        enhancement = np.zeros(len(age))
        mass = np.ones_like(age)*(total_stellar_mass/particles)
        age = age[::-1]
        depth = extends[j]
        vel_disp = velocity_dispersion[j]
        #################################

        # Here the ebf nbody input file is created
        pos = np.zeros((len(age),3))
        vel = np.zeros((len(age),3))
        for i in range(0,len(pos)):
            pos[i] = np.array([pos_x[j] + np.random.normal(0,depth/4), pos_y[j] + np.random.normal(0,depth/4), pos_z[j] + np.random.normal(0,depth/4)])
            vel[i] = np.array([vel_x[j] + np.random.normal(0,vel_disp), vel_y[j] + np.random.normal(0,vel_disp), vel_z[j] + np.random.normal(0,vel_disp)])
        print("median pos_x: ",np.median(pos[:,0]))
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/mass', mass,'w')	
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/feh', fehdex,'a')
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/id', 1,'a')
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/alpha', enhancement,'a')
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/age', age,'a')
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/pos3', pos,'a')
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '.ebf', '/vel3', vel,'a')

        # Preparing file for Enbid
        ps = np.concatenate((pos,vel),axis = 1)
        enbid_filename = '%s.dat' %(name)
        np.savetxt(enbid_filename,ps,fmt='%.6f')
        # Making the parameterfile for Enbid
        filedata = 'InitCondFile     %s\nICFormat                  0     \nSnapshotFileBase        _ph3\nSpatialScale            1 \nPartBoundary            7   \nNodeSplittingCriterion  1   \nCubicCells              1   \nMedianSplittingOn       0   \nTypeOfSmoothing      3\nDesNumNgb            64   \nVolCorr              1   \nTypeOfKernel           3 \nKernelBiasCorrection   1    \nAnisotropicKernel      0   \nAnisotropy             0   \nDesNumNgbA             128 \nTypeListOn        0\nPeriodicBoundaryOn 0 \n\n' %(enbid_filename)
        myparameterfile = "myparameterfile3"
        file = open(myparameterfile, "w")
        file.write(filedata)
        file.close()
        #Running Enbid
        args = ['./Enbid', myparameterfile]
        p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)	
        print("Enbid calculates smoothing length")
        (output, err) = p.communicate()
        # Writing to nbody smoothing length file 
        t = np.genfromtxt(enbid_filename + "_ph3.est",skip_header=1)
        d6 = np.zeros((len(pos),2))
        d6[:,0] = t[:,1]
        d6[:,1] = t[:,2]
        print(d6.shape,t.shape)
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '_d6n64_den.ebf', '/h_cubic', d6, 'w')

        # Same for 3d
        # Preparing file for Enbid
        enbid_filename = '%s3d.dat' %(name)
        np.savetxt(enbid_filename,pos,fmt='%.6f')
        # Making the parameterfile for Enbid
        filedata = 'InitCondFile     %s\nICFormat                  0     \nSnapshotFileBase        _ph3\nSpatialScale            1 \nPartBoundary            7   \nNodeSplittingCriterion  1   \nCubicCells              1   \nMedianSplittingOn       0   \nTypeOfSmoothing      3\nDesNumNgb            64   \nVolCorr              1   \nTypeOfKernel           3 \nKernelBiasCorrection   1    \nAnisotropicKernel      0   \nAnisotropy             0   \nDesNumNgbA             128 \nTypeListOn        0\nPeriodicBoundaryOn 0 \n\n' %(enbid_filename)
        myparameterfile = "myparameterfile3"
        file = open(myparameterfile, "w")
        file.write(filedata)
        file.close()
        #Running Enbid
        args = ['./Enbid3d', myparameterfile]
        p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)	
        print("Enbid calculates smoothing length")
        (output, err) = p.communicate()
        # Writing to nbody smoothing length file 
        t = np.genfromtxt(enbid_filename + "_ph3.est",skip_header=1)
        d3 = np.zeros((len(pos)))
        d3 = t[:,1]
        print(d3.shape,t.shape)
        ebf.write(nbody_folder + 'nbody1/' + folder + filename + name + '_d3n64_den.ebf', '/h_cubic', d3, 'w')

    # Here the file which tells Galaxia where to find the input file is created
    filedata = 'nbody1/%s\n         %d       1\n%s.ebf\n%s.ebf\n' %(folder,len(names), filename + names[0], filename + names[1])
    #filedata = 'nbody1/%s\n         %d       1\n%s.ebf\n' %(folder,1, filename + names[1])
    file = open(nbody_folder + "nbody1/filenames/" + filename + ".txt", "w")
    file.write(filedata)
    file.close()

In [8]:
create_n_body(nbody_folder,folder,nbody_filename)


/home/rybizki/Programme/GalaxiaData/nbody1/LSMC/ existed and was recreated
0 smc
median pos_x:  15.416334156100326
Enbid calculates smoothing length
(10000, 2) (10000, 3)
Enbid calculates smoothing length
(10000,) (10000, 3)
1 lmc
median pos_x:  -0.6862803294456253
Enbid calculates smoothing length
(100000, 2) (100000, 3)
Enbid calculates smoothing length
(100000,) (100000, 3)

Preparing a CMD of constant SFR to see what the age distribution of a specific population is


In [9]:
for seed in np.arange(10):
    print(seed)
    create_gdr2mock_mag_limited_survey_from_nbody(nbody_filename = nbody_filename,nside = 512,
                                              outputDir = folder_cat + "_%d" %(seed),
                                   use_previous = False, delete_ebf = True,
                                  fSample = 0.1, make_likelihood_asessment=False, seed = seed)


0
/home/rybizki/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/rybizki/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/rybizki/anaconda3/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
  from numpy.core.umath_tests import inner1d
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_0/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_0         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     0                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.53057     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n389630 accepted  9610370 rejected Parts=7052 outof 7051\nTotal Stars=14181385 accepted=552662 rejected=13628723\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572073 accepted  9427927 rejected Parts=11322 outof 11321\n1142853 accepted  18857147 rejected Parts=22644 outof 22643\n1715237 accepted  28284763 rejected Parts=33965 outof 33964\n2286504 accepted  37713496 rejected Parts=45287 outof 45286\n2859513 accepted  47140487 rejected Parts=56609 outof 56608\n3432657 accepted  56567343 rejected Parts=67932 outof 67931\n4005969 accepted  65994031 rejected Parts=79252 outof 79251\n4579004 accepted  75420996 rejected Parts=90574 outof 90573\nTotal Stars=88325964 accepted=5054325 rejected=83271639\n-----------Done---------------\nTotal stars written                 5606987                 \nFile written-                       ../output/MCs_0//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.76113     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     2.26562     \nTotal Time=                         141.249     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5606987
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 39.2 sec
0 5606987
1000000 5606987
2000000 5606987
3000000 5606987
4000000 5606987
5000000 5606987
converting time and applying extinction map for 5606987 sources in nside = 512 took 22.0 sec
indexing and remapping to isochrones took 23.9 sec
calculating extinction curve for all bands took 193.7 sec
5606987
2728627
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 21.4 sec
/home/rybizki/Desktop/Galaxia_wrap-master/library/defaults.py:9: UserWarning: 
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

The backend was *originally* set to 'module://ipykernel.pylab.backend_inline' by the following code:
  File "/home/rybizki/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/rybizki/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 16, in <module>
    app.launch_new_instance()
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 477, in start
    ioloop.IOLoop.instance().start()
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 177, in start
    super(ZMQIOLoop, self).start()
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 888, in start
    handler_func(fd_obj, events)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
    self._handle_recv()
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
    self._run_callback(callback, msg)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
    callback(*args, **kwargs)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
    return self.dispatch_shell(stream, msg)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 196, in do_execute
    res = shell.run_cell(code, store_history=store_history, silent=silent)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
    return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2698, in run_cell
    interactivity=interactivity, compiler=compiler, result=result)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2802, in run_ast_nodes
    if self.run_code(code, result):
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-5-9b4ede87243b>", line 1, in <module>
    get_ipython().magic('pylab inline')
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2146, in magic
    return self.run_line_magic(magic_name, magic_arg_s)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2067, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-108>", line 2, in pylab
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 155, in pylab
    gui, backend, clobbered = self.shell.enable_pylab(args.gui, import_all=import_all)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2969, in enable_pylab
    gui, backend = self.enable_matplotlib(gui)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2930, in enable_matplotlib
    pt.activate_matplotlib(backend)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 307, in activate_matplotlib
    matplotlib.pyplot.switch_backend(backend)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 231, in switch_backend
    matplotlib.use(newbackend, warn=False, force=True)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py", line 1422, in use
    reload(sys.modules['matplotlib.backends'])
  File "/home/rybizki/anaconda3/lib/python3.6/importlib/__init__.py", line 166, in reload
    _bootstrap._exec(spec, module)
  File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 16, in <module>
    line for line in traceback.format_stack()


  matplotlib.use('Agg') ## use a non-interactive Agg background
total number of stars = 27286270
0.0
27286270.00000089
2080701610.9025478
plotting time took 8.9 sec
Total time in minutes: 7.5
1
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_1/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_1         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     1                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.59447     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n390571 accepted  9609429 rejected Parts=7052 outof 7051\nTotal Stars=14181646 accepted=553487 rejected=13628159\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n573017 accepted  9426983 rejected Parts=11322 outof 11321\n1144315 accepted  18855685 rejected Parts=22644 outof 22643\n1716341 accepted  28283659 rejected Parts=33966 outof 33965\n2287207 accepted  37712793 rejected Parts=45288 outof 45287\n2858757 accepted  47141243 rejected Parts=56611 outof 56610\n3430717 accepted  56569283 rejected Parts=67933 outof 67932\n4003227 accepted  65996773 rejected Parts=79253 outof 79252\n4574721 accepted  75425279 rejected Parts=90576 outof 90575\nTotal Stars=88324293 accepted=5050403 rejected=83273890\n-----------Done---------------\nTotal stars written                 5603890                 \nFile written-                       ../output/MCs_1//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.79695     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     2.40186     \nTotal Time=                         149.842     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5603890
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 38.5 sec
0 5603890
1000000 5603890
2000000 5603890
3000000 5603890
4000000 5603890
5000000 5603890
converting time and applying extinction map for 5603890 sources in nside = 512 took 23.3 sec
indexing and remapping to isochrones took 26.4 sec
calculating extinction curve for all bands took 188.8 sec
5603890
2729263
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 23.4 sec
total number of stars = 27292630
0.0
27292630.00000085
2081186589.6939054
plotting time took 11.6 sec
Total time in minutes: 7.7
2
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_2/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_2         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     2                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.53381     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n390617 accepted  9609383 rejected Parts=7052 outof 7051\nTotal Stars=14182203 accepted=553867 rejected=13628336\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572279 accepted  9427721 rejected Parts=11322 outof 11321\n1145187 accepted  18854813 rejected Parts=22644 outof 22643\n1718508 accepted  28281492 rejected Parts=33964 outof 33963\n2289514 accepted  37710486 rejected Parts=45287 outof 45286\n2860270 accepted  47139730 rejected Parts=56610 outof 56609\n3431798 accepted  56568202 rejected Parts=67934 outof 67933\n4003992 accepted  65996008 rejected Parts=79255 outof 79254\n4575570 accepted  75424430 rejected Parts=90578 outof 90577\nTotal Stars=88321748 accepted=5051113 rejected=83270635\n-----------Done---------------\nTotal stars written                 5604980                 \nFile written-                       ../output/MCs_2//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.55473     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.67274     \nTotal Time=                         110.411     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5604980
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 34.3 sec
0 5604980
1000000 5604980
2000000 5604980
3000000 5604980
4000000 5604980
5000000 5604980
converting time and applying extinction map for 5604980 sources in nside = 512 took 19.9 sec
indexing and remapping to isochrones took 23.8 sec
calculating extinction curve for all bands took 154.2 sec
5604980
2731188
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 22.4 sec
total number of stars = 27311880
0.0
27311880.000000834
2082654489.3375664
plotting time took 11.1 sec
Total time in minutes: 6.3
3
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_3/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_3         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     3                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.2082      \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n389656 accepted  9610344 rejected Parts=7052 outof 7051\nTotal Stars=14181903 accepted=552146 rejected=13629757\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n570807 accepted  9429193 rejected Parts=11322 outof 11321\n1143068 accepted  18856932 rejected Parts=22644 outof 22643\n1715024 accepted  28284976 rejected Parts=33965 outof 33964\n2287819 accepted  37712181 rejected Parts=45287 outof 45286\n2861040 accepted  47138960 rejected Parts=56611 outof 56610\n3433488 accepted  56566512 rejected Parts=67933 outof 67932\n4006199 accepted  65993801 rejected Parts=79255 outof 79254\n4577280 accepted  75422720 rejected Parts=90577 outof 90576\nTotal Stars=88323541 accepted=5053443 rejected=83270098\n-----------Done---------------\nTotal stars written                 5605589                 \nFile written-                       ../output/MCs_3//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.46653     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.42        \nTotal Time=                         104.482     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5605589
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 29.5 sec
0 5605589
1000000 5605589
2000000 5605589
3000000 5605589
4000000 5605589
5000000 5605589
converting time and applying extinction map for 5605589 sources in nside = 512 took 17.8 sec
indexing and remapping to isochrones took 22.2 sec
calculating extinction curve for all bands took 148.2 sec
5605589
2729410
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 21.7 sec
total number of stars = 27294100
0.0
27294100.000000726
2081298683.8485029
plotting time took 10.4 sec
Total time in minutes: 5.9
4
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_4/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_4         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     4                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.19016     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n388528 accepted  9611472 rejected Parts=7052 outof 7051\nTotal Stars=14181912 accepted=551985 rejected=13629927\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572899 accepted  9427101 rejected Parts=11322 outof 11321\n1145413 accepted  18854587 rejected Parts=22643 outof 22642\n1718225 accepted  28281775 rejected Parts=33963 outof 33962\n2290048 accepted  37709952 rejected Parts=45286 outof 45285\n2862752 accepted  47137248 rejected Parts=56608 outof 56607\n3434393 accepted  56565607 rejected Parts=67930 outof 67929\n4007808 accepted  65992192 rejected Parts=79251 outof 79250\n4578511 accepted  75421489 rejected Parts=90573 outof 90572\nTotal Stars=88326078 accepted=5054995 rejected=83271083\n-----------Done---------------\nTotal stars written                 5606980                 \nFile written-                       ../output/MCs_4//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.45443     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.43392     \nTotal Time=                         104.706     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5606980
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 29.9 sec
0 5606980
1000000 5606980
2000000 5606980
3000000 5606980
4000000 5606980
5000000 5606980
converting time and applying extinction map for 5606980 sources in nside = 512 took 18.0 sec
indexing and remapping to isochrones took 22.9 sec
calculating extinction curve for all bands took 152.8 sec
5606980
2728322
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 22.6 sec
total number of stars = 27283220
0.0
27283220.00000071
2080469034.5953565
plotting time took 11.4 sec
Total time in minutes: 6.0
5
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_5/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_5         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     5                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.22532     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n391088 accepted  9608912 rejected Parts=7052 outof 7051\nTotal Stars=14182365 accepted=554538 rejected=13627827\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572283 accepted  9427717 rejected Parts=11322 outof 11321\n1145457 accepted  18854543 rejected Parts=22644 outof 22643\n1718386 accepted  28281614 rejected Parts=33966 outof 33965\n2291125 accepted  37708875 rejected Parts=45288 outof 45287\n2863079 accepted  47136921 rejected Parts=56610 outof 56609\n3436043 accepted  56563957 rejected Parts=67932 outof 67931\n4008366 accepted  65991634 rejected Parts=79254 outof 79253\n4581184 accepted  75418816 rejected Parts=90576 outof 90575\nTotal Stars=88323875 accepted=5057218 rejected=83266657\n-----------Done---------------\nTotal stars written                 5611756                 \nFile written-                       ../output/MCs_5//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.46658     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.39913     \nTotal Time=                         103.553     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5611756
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 30.4 sec
0 5611756
1000000 5611756
2000000 5611756
3000000 5611756
4000000 5611756
5000000 5611756
converting time and applying extinction map for 5611756 sources in nside = 512 took 17.9 sec
indexing and remapping to isochrones took 22.0 sec
calculating extinction curve for all bands took 152.3 sec
5611756
2734141
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 21.2 sec
total number of stars = 27341410
0.0
27341410.00000081
2084906285.518206
plotting time took 11.0 sec
Total time in minutes: 6.0
6
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_6/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_6         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     6                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.21893     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n391355 accepted  9608645 rejected Parts=7051 outof 7050\nTotal Stars=14182128 accepted=553952 rejected=13628176\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572086 accepted  9427914 rejected Parts=11323 outof 11322\n1144980 accepted  18855020 rejected Parts=22645 outof 22644\n1717230 accepted  28282770 rejected Parts=33966 outof 33965\n2288476 accepted  37711524 rejected Parts=45289 outof 45288\n2861768 accepted  47138232 rejected Parts=56610 outof 56609\n3433297 accepted  56566703 rejected Parts=67933 outof 67932\n4005192 accepted  65994808 rejected Parts=79255 outof 79254\n4577206 accepted  75422794 rejected Parts=90577 outof 90576\nTotal Stars=88323543 accepted=5053663 rejected=83269880\n-----------Done---------------\nTotal stars written                 5607615                 \nFile written-                       ../output/MCs_6//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.46406     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.40207     \nTotal Time=                         127.123     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5607615
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 29.9 sec
0 5607615
1000000 5607615
2000000 5607615
3000000 5607615
4000000 5607615
5000000 5607615
converting time and applying extinction map for 5607615 sources in nside = 512 took 17.9 sec
indexing and remapping to isochrones took 22.1 sec
calculating extinction curve for all bands took 152.5 sec
5607615
2730541
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 22.3 sec
total number of stars = 27305410
0.0
27305410.00000074
2082161122.548235
plotting time took 11.4 sec
Total time in minutes: 6.4
7
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_7/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_7         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     7                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.23528     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n390590 accepted  9609410 rejected Parts=7052 outof 7051\nTotal Stars=14182137 accepted=553460 rejected=13628677\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n571086 accepted  9428914 rejected Parts=11322 outof 11321\n1141837 accepted  18858163 rejected Parts=22644 outof 22643\n1713997 accepted  28286003 rejected Parts=33965 outof 33964\n2284841 accepted  37715159 rejected Parts=45287 outof 45286\n2856706 accepted  47143294 rejected Parts=56610 outof 56609\n3429100 accepted  56570900 rejected Parts=67933 outof 67932\n4001529 accepted  65998471 rejected Parts=79254 outof 79253\n4573810 accepted  75426190 rejected Parts=90575 outof 90574\nTotal Stars=88324850 accepted=5050635 rejected=83274215\n-----------Done---------------\nTotal stars written                 5604095                 \nFile written-                       ../output/MCs_7//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.45454     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.42331     \nTotal Time=                         103.726     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5604095
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 30.2 sec
0 5604095
1000000 5604095
2000000 5604095
3000000 5604095
4000000 5604095
5000000 5604095
converting time and applying extinction map for 5604095 sources in nside = 512 took 18.0 sec
indexing and remapping to isochrones took 21.8 sec
calculating extinction curve for all bands took 147.8 sec
5604095
2729448
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 21.6 sec
total number of stars = 27294480
0.0
27294480.00000079
2081327660.5687463
plotting time took 11.1 sec
Total time in minutes: 5.9
8
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_8/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_8         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     8                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.18573     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n390282 accepted  9609718 rejected Parts=7051 outof 7050\nTotal Stars=14182958 accepted=553046 rejected=13629912\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572282 accepted  9427718 rejected Parts=11322 outof 11321\n1144182 accepted  18855818 rejected Parts=22643 outof 22642\n1716155 accepted  28283845 rejected Parts=33965 outof 33964\n2287278 accepted  37712722 rejected Parts=45289 outof 45288\n2858497 accepted  47141503 rejected Parts=56611 outof 56610\n3430208 accepted  56569792 rejected Parts=67935 outof 67934\n4001892 accepted  65998108 rejected Parts=79256 outof 79255\n4573638 accepted  75426362 rejected Parts=90578 outof 90577\nTotal Stars=88322364 accepted=5050537 rejected=83271827\n-----------Done---------------\nTotal stars written                 5603583                 \nFile written-                       ../output/MCs_8//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.44607     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.39745     \nTotal Time=                         104.704     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5603583
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 29.5 sec
0 5603583
1000000 5603583
2000000 5603583
3000000 5603583
4000000 5603583
5000000 5603583
converting time and applying extinction map for 5603583 sources in nside = 512 took 17.5 sec
indexing and remapping to isochrones took 22.1 sec
calculating extinction curve for all bands took 150.4 sec
5603583
2729431
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 22.7 sec
total number of stars = 27294310
0.0
27294310.00000071
2081314697.29916
plotting time took 11.2 sec
Total time in minutes: 6.0
9
Galaxia spawns catalogue
output:  b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file-             ../output/MCs_9/nbody.log\n--------------------------------------------------------\noutputFile               nbody                   \nmodelFile                Model/population_parameters_BGM_update.ebf\ncodeDataDir              /home/rybizki/Programme/GalaxiaData\noutputDir                ../output/MCs_9         \nphotoSys                 parsec1/GAIADR3         \nmagcolorNames            gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0]          -1000.000000            \nappMagLimits[1]          20.700000               \nabsMagLimits[0]          -1000.000000            \nabsMagLimits[1]          1000.000000             \ncolorLimits[0]           -1000.000000            \ncolorLimits[1]           1000.000000             \ngeometryOption           0                       \nlongitude                0.000000                \nlatitude                 90.000000               \nsurveyArea               1000.000000             \nfSample                  0.100000                \npopID                    -1                      \nwarpFlareOn              1                       \nseed                     9                       \nr_max                    1000.000000             \nstarType                 0                       \nphotoError               0                       \n--------------------------------------------------------\nReading Halo Sat File=/home/rybizki/Programme/GalaxiaData/nbody1/filenames/MCs.txt\nnbody1/LSMC/MCssmc.ebf 0\nnbody1/LSMC/MCslmc.ebf 0\nNo of Satellites   =2\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry:                     All Sky\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.20694     \n------------------------------\nnbody1/LSMC/MCssmc.ebf  Sat No=0\nParticles=10000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=10000 Mass=6e+08 0.493087\n390596 accepted  9609404 rejected Parts=7052 outof 7051\nTotal Stars=14181747 accepted=553847 rejected=13627900\n-----------Done---------------\n------------------------------\nnbody1/LSMC/MCslmc.ebf  Sat No=0\nParticles=100000\nSatellite Info\nSatellite Initializing ....... Done\nParticles=100000 Mass=3.8e+09 0.493087\n572088 accepted  9427912 rejected Parts=11323 outof 11322\n1144456 accepted  18855544 rejected Parts=22644 outof 22643\n1716762 accepted  28283238 rejected Parts=33964 outof 33963\n2287124 accepted  37712876 rejected Parts=45287 outof 45286\n2859537 accepted  47140463 rejected Parts=56610 outof 56609\n3430685 accepted  56569315 rejected Parts=67933 outof 67932\n4002752 accepted  65997248 rejected Parts=79254 outof 79253\n4575679 accepted  75424321 rejected Parts=90576 outof 90575\nTotal Stars=88324914 accepted=5051157 rejected=83273757\n-----------Done---------------\nTotal stars written                 5605004                 \nFile written-                       ../output/MCs_9//nbody.ebf\nCalulating magnitudes................\nReading Isochrones from dir-        /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size:                (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading              1.45209     \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation     1.38147     \nTotal Time=                         104.238     \n'
error:  b''
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
5605004
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 30.0 sec
0 5605004
1000000 5605004
2000000 5605004
3000000 5605004
4000000 5605004
5000000 5605004
converting time and applying extinction map for 5605004 sources in nside = 512 took 18.3 sec
indexing and remapping to isochrones took 25.3 sec
calculating extinction curve for all bands took 161.8 sec
5605004
2728071
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 21.1 sec
total number of stars = 27280710
0.0
27280710.00000077
2080277635.732733
plotting time took 11.2 sec
Total time in minutes: 6.2